package us.mooresr.webtroopmanager.client.events;

import us.mooresr.webtroopmanager.shared.VehicleSummary;

import com.google.gwt.event.shared.GwtEvent;

public class VehicleAddedEvent extends GwtEvent<VehicleAddedHandler> {
	private final VehicleSummary vehicleSummary;
	public static final Type<VehicleAddedHandler> TYPE = new Type<VehicleAddedHandler>();

	public VehicleAddedEvent(VehicleSummary vehicleSummary) {
		super();
		this.vehicleSummary = vehicleSummary;
	}

	@Override
	protected void dispatch(VehicleAddedHandler handler) {
		handler.onAddEvent(this);		
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<VehicleAddedHandler> getAssociatedType() {
		return TYPE;
	}

	public VehicleSummary getVehicleSummary() {
		return vehicleSummary;
	}
	
	

}
